<%@include file="package.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script src="jquery-3.4.1.js" ></script>
<script src="vue.min.js" ></script>
</head>
<body >
<div id="app">



<%-- <script type="text/javascript">
var pagNo1=<%=pagNo%>;
$(function () {
	
    $("#shang").click(function () {
        pagNo1++;
        alert(pagNo1);
    })
});
var vm=new Vue({
	el:'#app',
	data:{
		pagNo:1
	}
	
})
	

</script> --%>
<table border="1px">
<%

StudentSerive ss=new StudentSerive();
List<Student> list=ss.findAll();
int a=list.size();
String pagNo1=request.getParameter("pagNo");
if(pagNo1==null){
	pagNo1="1";
}
int pagNo=Integer.parseInt(pagNo1);
List<Student> list1=ss.paging2(pagNo, 10);
for(Student st:list1){
%>	
<tr>
<td><%=st.getSname() %></td>
<td><%=st.getSex() %></td>
<td><%=st.getFromcity() %></td>
</tr>
<% }%>
</table>
<p>
<span>共<%=a %>条</span>
<p id="shang"><a href="fenye.jsp">首页</a></p>
<p id="shang"><a href="fenye.jsp?pagNo=<%=pagNo-1%>">上一页</a></p>
<p id="xia"><a href="fenye.jsp?pagNo=<%=pagNo+1%>">下一页</a></p>
<span ><%=pagNo %></span>
</p>
</div>
</body>
</html>